<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="../assets/js/vue.js"></script>
    <title>v-text & v-html 案例</title>
</head>

<body>
    <h1>v-text & v-html 案例</h1>
    <hr>

    <div id="app">
        <span>{{ message }}</span>=<span v-text="message"></span><br/>
        <span v-html="msgHtml"></span>
    </div>
    <script>
        var app = new Vue({
            el: '#app',
            data: {
                message: 'hello vue!',
                msgHtml: '<h2>hello vue!</h2>'
            }
        })
    </script>
</body>

</html>